<h1>Listing items</h1>

<table>
  <thead>
    <tr>      
      <th>Icon</th>
      <th>Item Name</th>
    </tr>  
    </thead>    
  </thead>
  <tbody>  
  <% for item in @items %>
    <tr>
    <td><%= externalIcon(item) %></td>
    <td><%= link_to item.name, :action => 'show' , :id => item.id %></td>
    </tr>
    
  <% end %>
  </tbody>
</table>

<%= link_to 'Previous page', { :page => @item_pages.current.previous } if @item_pages.current.previous %>
<%= link_to 'Next page', { :page => @item_pages.current.next } if @item_pages.current.next %> 

<br />

<%= link_to 'New item', :action => 'new' %>
